<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>模拟jquery连续调用</title>
</head>
<body>

</body>
<script>
    // this实现对象连续调用
    var obj = {
        username : function () {
            console.log('user1');
            return this;
        },
        passwd : function () {
            console.log('123');
            return this;
        }
    }
    obj.username().passwd()
</script>
</html>
